@import 'new_zj/fonts.css';

:root {
    /* 中性色 */
    --mid-1: #ffffff;
    --mid-4: #f0f0f0;
    --mid-7: #8c8c8c;
    --mid-13: #000000;
    /* 主题色 */
    --main-2: #ffd4cc;
    --main-3: #ffafa3;
    --main-4: #ff887a;
    --main-5: #ff5d52;
    --main-6: #f22f27;
    --painterly-1: blue;
    /*--main-7: #cc1616;*/ /*--main-8: #a60a0f;*/ /*--main-9: #80010a;*/ /* 唯一一个用到 main-10 的地方是 h1 标题字体颜色*/
    --main-10: #590009;
    /* 样式中的圆角大小 */
    --border-radius: 0.2rem;
    /* 文档最大宽度 */
    --content-width: 50rem;
}

/* 进入动画 */
@keyframes from-right-enter {
    from {
        transform: translateX(40px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes from-left-enter {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes from-down-enter {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes from-small-enter {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 弹出菜单 */
.dropdown-menu {
    border: solid 1px var(--main-6);
    border-radius: var(--border-radius);
    animation: 0.2s from-left-enter;
    overflow: hidden;
    background: #FFFFFFAA !important;
    backdrop-filter: blur(24px);
    box-shadow: 0 0 12px #00000033;
}

/* 右键菜单 */
#outline-menu,
#file-menu,
#context-menu {
    animation: 0.2s from-small-enter;
}

/*菜单子项 */
.dropdown-menu a {
    transition: transform 0.13s;
}

.dropdown-menu a:hover {
    transform: scale(1.05);
}

/* 文件目录和大纲 */
@keyframes file-node-ani {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(4px);
    }
}

.outline-item:hover,
.file-node-content:hover {
    animation: 0.1s file-node-ani;
    animation-fill-mode: forwards;
}

/* Ctrl + f 出现的 顶部搜索栏 */

#md-searchpanel input,
#md-searchpanel #md-search-type-label,
#md-searchpanel #md-replace-type-label {
    transform: translateY(-0.24rem);
}

/* 给搜索栏的按钮加点圆角 */
#md-searchpanel .btn {
    border-radius: var(--border-radius);
}

/* 搜索栏的焦点阴影颜色 */
input[type="text"]:focus {
    box-shadow: 0 0 5px var(--main-6) !important;
    border-color: var(--main-4) !important;
}

/* 主文档宽度 */
#write {
    max-width: var(--content-width) !important;
}

/* 六级标题居中 */
#write h6 {
    text-align: center;
}

/* 弹出窗口 */
div.modal-content {
    border-radius: var(--border-radius);
    border: solid 1px var(--main-6);
}

/* 弹出窗口的主按钮 */
button.btn.btn-primary {
    background-color: var(--main-6) !important;
}

button.btn.btn-primary:hover {
    background-color: var(--main-5) !important;
}

/* 窗口底部的那些按钮 */
.footer-item {
    border-radius: var(--border-radius);
}

/* 窗口底部的字数统计和拼写检查小窗口 */
#spell-check-panel,
#footer-word-count-info {
    animation: 0.2s from-down-enter;
}

/* 一体化窗口的菜单 */
#megamenu-menu-list {
    background-color: #00000000 !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* 一体化窗口的菜单里面的每一项 */

#megamenu-menu-list a[role="menuitem"] {
    transition: 0.2s;
}

#megamenu-menu-list a[role="menuitem"].active {
    background-color: #00000033 !important;
}

#megamenu-menu-list a[role="menuitem"]:hover {
    transform: unset !important;
    background-color: #00000033 !important;
}

html {
    font-size: 17px;
}

body {
    font-family: "Vollkorn", Palatino, Times;
    color: var(--mid-13);
    -webkit-font-smoothing: antialiased;
    line-height: 1.8rem;
    letter-spacing: 0;
    margin: 0;
    overflow-x: hidden;
}

#write {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 30px 160px;
}

#write p {
    line-height: 1.8rem;
    word-spacing: .05rem;
    /* color: #3f3f3f; */
    color: var(--mid-13);
}


/* #write ol li {
    padding-left: 0.5rem;
} */

#write > ul:first-child,
#write > ol:first-child {
    margin-top: 30px;
}

body > *:first-child {
    margin-top: 0 !important;
}

body > *:last-child {
    margin-bottom: 0 !important;
}


/* a {
    color: var(--main-6);
    font-weight: 500;
    padding: 0 2px;
    text-decoration: none;
} */

a {
    color: var(--painterly-1);
    font-weight: 500;
    padding: 0 2px;
    text-decoration: none;
}


/* 链接 */


/* #write a {
    border-bottom: 1px solid var(--main-6);
    color: var(--main-6);
    text-decoration: none;
} */

#write a {
    border-bottom: 1px solid var(--painterly-1);
    color: var(--painterly-1);
    text-decoration: none;
}


/* 目录 */
#write a[href],
#write a.md-toc-inner {
    line-height: 1.6;
    white-space: pre-line;
    border-bottom: none;
    transition: color 0.2s, border 0.2s;
}

#write a:hover {
    border-bottom: 2px solid var(--main-6);
    color: var(--main-5);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: normal;
    line-height: 1.4;
    cursor: text;
}

h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}

h1 *,
h2 *,
h3 *,
h4 *,
h5 *,
h6 * {
    font-style: normal !important;
}

h1 tt,
h1 code {
    font-size: inherit !important;
}

h2 tt,
h2 code {
    font-size: inherit !important;
}

h3 tt,
h3 code {
    font-size: inherit !important;
}

h4 tt,
h4 code {
    font-size: inherit !important;
}

h5 tt,
h5 code {
    font-size: inherit !important;
}

h6 tt,
h6 code {
    font-size: inherit !important;
}

/* 这一段是干啥的啊 */
/*h2 a,*/
/*h3 a {*/
/*    color: #34495e;*/
/*}*/

h1 {
    text-align: center;
    padding-bottom: 0.3em;
    font-size: 2.2em;
    line-height: 1.2;
    margin: 2.4em auto 1.2em;
    color: var(--main-10);
}

h1:after {
    content: '';
    display: block;
    margin: 0.2em auto 0;
    width: 100px;
    height: 2px;
    border-bottom: 2px solid var(--main-6);
}

h2 {
    margin: 2em auto 1.4em;
    /* padding-left: 10px; */
    /* display:inline-block; */
    line-height: 1.4;
    font-size: 1.8em;
    /* border-left: 9px solid var(--main-6); */
    /* border-bottom: 1px solid #ddd; */
    border-bottom: 1px solid var(--main-6);
}

h2::before {
    content: '# ' !important;
    color:var(--main-6);
    /*color: #f22f27;*/
}

h3 {
    font-size: 1.4em;
    line-height: 1.43;
    margin: 1.6em auto 1.2em;
    padding-left: 9px;
    border-left: 5px solid var(--main-6);
}


/* 三级四级标题点击后左边的提示图标 */

#write > h3.md-focus:before,
#write > h4.md-focus:before {
    width: auto;
    height: auto;
    background-color: var(--main-6);
    color: var(--mid-1);
}

h4 {
    margin-top: 1.3em;
    font-size: 1.2em;
    padding-left: 6px;
    padding-right: 6px;
    display: inline-block;
    border: 1px solid var(--main-6);
    border-top: 4px solid var(--main-6);
}

#write h5::before,
#write h6::before {
    position: absolute;
    right: calc(100% + .75em);
    top: 0;
    color: var(--mid-7);
    font-size: 0.8rem;
    font-weight: bold;
    font-variant: small-caps;
    white-space: nowrap;
    /* 文本强制不换行 */
    border: 0;
}

#write h5 {
    /* margin-left: 2em; */
    font-size: 1rem;
}

#write h6 {
    /* margin-left: 2.5em; */
    font-size: 1rem;
}

#write h5::before {
    content: 'H5';
    top: 0.18rem;
}

#write h6::before {
    content: 'H6';
    top: 0.18rem;
}

p,
blockquote,
ul,
ol,
dl,
table {
    margin: 0.8em 0;
}

li > ol,
li > ul {
    margin: 0 0;
}

hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

body > h2:first-child {
    margin-top: 0;
    padding-top: 0;
}

body > h1:first-child {
    margin-top: 0;
    padding-top: 0;
}

body > h1:first-child + h2 {
    margin-top: 0;
    padding-top: 0;
}

body > h3:first-child,
body > h4:first-child,
body > h5:first-child,
body > h6:first-child {
    margin-top: 0;
    padding-top: 0;
}

a:first-child h1,
a:first-child h2,
a:first-child h3,
a:first-child h4,
a:first-child h5,
a:first-child h6 {
    margin-top: 0;
    padding-top: 0;
}

h1 p,
h2 p,
h3 p,
h4 p,
h5 p,
h6 p {
    margin-top: 0;
}

#write ol,
#write ul {
    padding-left: 25px;
    margin: .5rem 0;
}

#write ol > li,
#write ul > li {
    color: var(--main-5);
    /*color: #db4d52;*/
    font-weight: bold;
}

#write ol > li > *,
#write ul > li > * {
    color: #333;
    font-weight: normal;
}

#write ol > li > *:not(ol):not(ul),
#write ul > li > *:not(ol):not(ul) {
    padding-left: .25rem;
}

#write ul {
    list-style-type: disc;
}

blockquote {
    border-left: 4px solid rgb(239, 112, 96);
    padding: 10px 15px;
    color: #3f3f3f;
    background-color: #fff9f9;
}

blockquote > blockquote {
    border: solid rgb(239, 112, 96) 1px;
    border-left: 4px solid rgb(239, 112, 96);
}

table {
    padding: 0;
    word-break: initial;
}

table tr {
    border-top: 1px solid var(--main-3);
    margin: 0;
    padding: 0;
}

table tr:nth-child(2n),
thead {
    background-color: #fafafa;
}

table tr th {
    font-weight: bold;
    border: 1px solid var(--main-3);
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}

table tr td {
    border: 1px solid var(--main-3);
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}

table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}

table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

#write strong {
    padding: 0.1em;
    color: var(--main-6);
    /*color: #dc3545;*/
}

#write em {
    padding: 0 2px 0 2px;
    font-style: italic;
    color: var(--main-6);
    /*color: #ff3502;*/
    /* color: #595959;
    background: #F6EEFF; */
}


/* 数学公式变蓝 */

[md-inline='inline_math'] {
    color: var(--painterly-1);
    font-size: 100%;
}


/* 表格第一行 */
/*#write table thead th {*/
/*    background-color: var(--main-1);*/
/*    color: #f8f8f8;*/
/*}*/

#write .code-tooltip {
    animation: 0.4s from-right-enter;
    box-shadow: none !important;
    /*border: solid 1px rgb(112,112,112);*/
}

#write .code-tooltip span {
    box-shadow: 0 1px 1px 0 rgba(0, 28, 36, .2);
}

/* 行号左框线 */
#write .CodeMirror-gutters {
    border-right: 1px solid rgba(204, 51, 0, 1);
}

/* 代码框 */

#write .md-fences {
    border: 1px solid #7a7a7a;
    -webkit-font-smoothing: initial;
    margin: 2rem 0 !important;
    /* padding: 0.3rem 0 !important; */
    padding: 3px 5px;
    line-height: 1.55rem;
    border-radius: var(--border-radius);
    font-family: 'Roboto Mono', 'Source Sans Pro', 'Microsoft YaHei', '微软雅黑' !important;
    font-size: 0.9rem;
    word-wrap: normal;
}

#write [mdtype="math_block"] {
    font-size: 1.2rem;
}

#write .CodeMirror-wrap .CodeMirror-code pre {
    padding-left: 12px;
    line-height: 1.55rem;
}

/*.cm-s-inner .CodeMirror-linenumber {*/
/*    width: 2ch !important;*/
/*    color: rgba(128, 128, 255, 0.8);*/
/*}*/

#write .CodeMirror-cursors .CodeMirror-cursor {
    border-left: 2px solid var(--main-4);
}


/* 行间代码 */

#write code,
tt {
    padding: 2px 4px;
    margin: 6px;
    border-radius: var(--border-radius);
    font-family: 'Source Code Pro', Roboto Mono, Source Sans Pro, 'Microsoft YaHei', '微软雅黑' !important;
    font-size: 0.92rem;
    color: #ff3502;
    background-color: #f8f5ec;
    /* color: #c7254e;
    background-color: #f9f2f4;  */
}

tt {
    margin: 0 2px;
}

#write .md-footnote {
    background-color: #f8f8f8;
    color: #e96900;
}


/* 流程图块 */

#write .md-diagram-panel {
    position: relative;
    margin: 24px auto;
}

#write .md-focus .md-diagram-panel {
    border: 1px solid var(--main-4);
    border-radius: var(--border-radius);
}


/* heighlight. */

#write mark {
    background-color: #EBFFEB;
    border-radius: var(--border-radius);
    padding: 2px 4px;
    margin: 0 2px;
    color: #222;
    font-weight: 500;
}

#write del {
    padding: 1px 2px;
}

.cm-s-inner .cm-link,
.cm-s-inner.cm-link {
    color: #22a2c9;
}

.cm-s-inner .cm-string {
    color: #22a2c9;
}


/* 任务列表小方框 */

.md-task-list-item > input {
    margin-left: -1.3em;
    margin-top: 0.3rem;
    -webkit-appearance: none;
}

.md-task-list-item > input:before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: middle;
    text-align: center;
    font-size: 0.8rem;
    color: var(--mid-1);
    border-radius: 123em;
    border: 1px solid var(--main-4);
    margin-top: -0.2rem;
    transition: all 0.2s linear;
}

.md-task-list-item > input:checked:before,
.md-task-list-item > input[checked]:before {
    content: '\2714';
    font-size: 0.625rem;
    color: var(--mid-1);
    border: 1px solid var(--main-6);
    background-color: var(--main-6);
    box-shadow: 0 0 8px 0 var(--main-4);
}

@media print {
    html {
        font-size: 8px;
    }
}

/* @media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
} */


/* .md-fences {
    background-color: #f8f8f8;
} */

#write pre.md-meta-block {
    /* padding: 1rem; */
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: var(--border-radius);
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block > .code-tooltip {
    bottom: .375rem;
    /* bottom: .575rem; */
}

#write > h3.md-focus:before {
    left: -1.5625rem;
    top: .375rem;
}

#write > h4.md-focus:before {
    left: -1.5625rem;
    top: .285714286rem;
}

#write > h5.md-focus:before {
    left: -1.5625rem;
    top: .285714286rem;
}

#write > h6.md-focus:before {
    left: -1.5625rem;
    top: .285714286rem;
}


/*--- 图片 ---*/

.md-image {
    margin: 24px auto;
    border-radius: var(--border-radius);
}

.md-image img {
    border-radius: var(--border-radius);
}


/* 当 “![shadow-随便写]()”写时，会有阴影 */
.md-image img[alt|='shadow'] {
    /* box-shadow: 0 4px 24px -6px #ddd; */
    box-shadow: #84A1A8 0px 10px 15px;
}

.md-image > .md-meta {
    border-radius: var(--border-radius);
    font-family: Consolas, 'Liberation Mono', Courier, monospace;
    padding: 2px 0 0 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: inherit;
}

.md-toc {
    margin-top: 20px;
    padding-bottom: 20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

#md-notification:before {
    top: 10px;
}


/** focus mode */

.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header,
.context-menu,
.megamenu-content,
footer {
    font-family: 'Segoe UI', 'Arial', sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state {
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: var(--mid-1);
}

.md-lang {
    color:var(--main-4);
    /*color: #b4654d;*/
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #e6f0fe;
}


/* 侧边栏 */
.file-list-item.active {
    background: var(--main-2);
    color: var(--mid-13);
    border-left: 4px solid var(--main-6);
}

.file-tree-node.active > .file-node-background {
    background-color: var(--main-2);
    border-left: 4px solid var(--main-6);
    border-color: var(--main-6);
}

@media print {
    .typora-export * {
        -webkit-print-color-adjust: exact;
    }

    html {
        font-size: 16px !important;
    }

    body {
        font-family: Times, 'SimSun' !important;
        color: var(--mid-13) !important;
    }

    p {
        color: var(--mid-13) !important;
    }

    a {
        color: var(--painterly-1) !important;
        /* border-bottom: 1px solid blue!important; */
    }

    table,
    pre {
        page-break-inside: avoid;
    }

    pre {
        word-wrap: break-word;
    }
}